package cn.sylinx.horm.core.interceptor;

import cn.sylinx.horm.config.OrmConfigHolder;
import cn.sylinx.horm.interceptor.InterceptorManager;
import cn.sylinx.horm.interceptor.Invocation;

class SqlClientInterceptorManager extends InterceptorManager<SqlClientInterceptor> {

    static SqlClientInterceptorManager INSTANCE = new SqlClientInterceptorManager(SqlClientInterceptor.class);

    private SqlClientInterceptorManager(Class<SqlClientInterceptor> clazz) {
        super(clazz);
    }

    @Override
    protected SqlClientInterceptor getFromConfig() {
        return OrmConfigHolder.getSqlClientInterceptor();
    }

    @Override
    protected SqlClientInterceptor getDefault() {
        return Invocation::proceed;
    }
}
